home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol2 / snip_dropdown.dba < prev    next >
Encoding:
Text File  |  2000-08-20  |  1.8 KB  |  98 lines

  1. `    ------------------------------------------------------------------------
  2. `    How Low Can You Go?                         DarkForge Snippet (8/8/2000)
  3. `    ------------------------------------------------------------------------
  4. `
  5. `    Replace with any BMP file and watch it slide onto the screen!
  6. `    Hard to explain - so just run it okay?! First seen on the ST years ago.
  7.  
  8. sync rate 0
  9. sync on
  10. hide mouse
  11.  
  12. load bitmap "anhk_inside.bmp",1
  13.  
  14. create bitmap 3,screen width(),screen height()
  15. set current bitmap 1
  16.  
  17. if bitmap height(1)>screen height() then rescale=1
  18. if bitmap width(1)>screen width() then rescale=1
  19.  
  20. if rescale=1
  21.  
  22.     sw=screen width()
  23.     sh=screen height()
  24.  
  25.     if sw>bitmap width(1) then sw=bitmap width(1)
  26.     if sh>bitmap height(1) then sh=bitmap height(1)
  27.  
  28.     get image 1,0,0,sw,sh
  29.     create bitmap 2,screen width(),screen height()
  30.     paste image 1,0,0
  31.     set current bitmap 0
  32.     delete bitmap 1
  33.     create bitmap 1,screen width(),screen height()
  34.     copy bitmap 2,1
  35.     delete bitmap 2
  36.  
  37. else
  38.  
  39.     set current bitmap 0
  40.  
  41. endif
  42.  
  43. `    Change the offset value for more/less speeeeed while drawing
  44.  
  45. offset=1
  46. y=0
  47. y2=bitmap height(1)
  48.  
  49. repeat
  50.  
  51.     set current bitmap 1
  52.     get image 1,0,y2-offset,bitmap width(1),y2
  53.     set current bitmap 3
  54.  
  55.     for a=0 to bitmap height(1)-y step offset
  56.         paste image 1,0,a
  57.     next a
  58.  
  59.     inc y,offset
  60.     dec y2,offset
  61.  
  62.     set current bitmap 0
  63.     copy bitmap 3,0
  64.  
  65.     sync
  66.  
  67. until y=bitmap height(1)
  68.  
  69. wait key
  70.  
  71. y=480
  72. y2=bitmap height(1)-offset
  73.  
  74. repeat
  75.  
  76.     set current bitmap 1
  77.     get image 1,0,y2,bitmap width(1),y2+offset
  78.     set current bitmap 3
  79.  
  80.     for a=1 to bitmap height(1)-y step offset
  81.         paste image 1,0,480-a
  82.     next a
  83.  
  84.     if y>0 then dec y,offset
  85.     dec y2,offset
  86.  
  87.     set current bitmap 0
  88.     copy bitmap 3,0
  89.  
  90.     sync
  91.  
  92. until y=0
  93.  
  94. cls 0
  95.  
  96. end
  97.  
  98.